package com.belf.console.domain;

import com.belf.common.annotation.Excel;
import com.belf.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * SQL执行对象 data_sql_task
 * 
 * @author belf
 * @date 2024-08-03
 */
@Data
@EqualsAndHashCode(callSuper=false)
public class DataSqlTask extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 编号 */
    private Long id;

    /** 名称 */
    @Excel(name = "名称")
    private String sqlName;

    /** SQL内容 */
    @Excel(name = "SQL内容")
    private String sqlContext;

    /** 数据源ID */
    @Excel(name = "数据源ID")
    private String datasourceId;
    @Excel(name = "实例名")
    private String dataSourceName;

    /** 数据库名称 */
    @Excel(name = "数据库名称")
    private String databaseName;

    /** 执行状态 */
    @Excel(name = "执行状态")
    private Long executeStatus;

    /** 执行结果 */
    @Excel(name = "执行结果")
    private String executeResult;

    /** 状态 */
    @Excel(name = "状态")
    private Long status;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setSqlName(String sqlName) 
    {
        this.sqlName = sqlName;
    }

    public String getSqlName() 
    {
        return sqlName;
    }
    public void setSqlContext(String sqlContext) 
    {
        this.sqlContext = sqlContext;
    }

    public String getSqlContext() 
    {
        return sqlContext;
    }
    public void setDatasourceId(String datasourceId) 
    {
        this.datasourceId = datasourceId;
    }

    public String getDatasourceId() 
    {
        return datasourceId;
    }
    public void setDatabaseName(String databaseName) 
    {
        this.databaseName = databaseName;
    }

    public String getDatabaseName() 
    {
        return databaseName;
    }
    public void setExecuteStatus(Long executeStatus) 
    {
        this.executeStatus = executeStatus;
    }

    public Long getExecuteStatus() 
    {
        return executeStatus;
    }
    public void setExecuteResult(String executeResult) 
    {
        this.executeResult = executeResult;
    }

    public String getExecuteResult() 
    {
        return executeResult;
    }
    public void setStatus(Long status) 
    {
        this.status = status;
    }

    public Long getStatus() 
    {
        return status;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("sqlName", getSqlName())
            .append("sqlContext", getSqlContext())
            .append("datasourceId", getDatasourceId())
            .append("databaseName", getDatabaseName())
            .append("executeStatus", getExecuteStatus())
            .append("executeResult", getExecuteResult())
            .append("status", getStatus())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
